#include "useropeninfo.h"

namespace yc {

void UserOpenInfo::updateData(const QJsonObject& jo)
{
    if (jo.contains("id")) {
        setId(jo["id"].toInt());
    }
    if (jo.contains("name")) {
        setName(jo["name"].toString());
    }
    if (jo.contains("nickname")) {
        setNickname(jo["nickname"].toString());
    }
    if (jo.contains("gender")) {
        setGender(jo["gender"].toInt());
    }
    if (jo.contains("cover")) {
        setCover(jo["cover"].toString());
    }
    if (jo.contains("avatar")) {
        setAvatar(jo["avatar"].toString());
    }
    if (jo.contains("address")) {
        setAddress(jo["address"].toString());
    }
    if (jo.contains("profile")) {
        setProfile(jo["profile"].toString());
    }
    if (jo.contains("status")) {
        setStatus(jo["status"].toInt());
    }
}

} // namespace yc
